package fenyu.personblob.bean.factory;

import fenyu.personblob.bean.Bean;
import fenyu.personblob.bean.factory.abstractf.*;

/**
 * 工厂实际实现者
 * create at 2018/12/21 21:52
 *
 * @author 纷羽 <gzj0078@gmail.com>
 */
public class AutoFactory extends AbstractFactory {

    private AbstractFactory blobFactory = new BlobFactory();

    private AbstractFactory blobCommentFactory = new BlobCommentFactory();

    private AbstractFactory userFactory = new UserFactory();

    @Override
    public Bean createUser(String type) {
        return userFactory.createUser(type);
    }

    @Override
    public Bean createBlob(String type) {
        return blobFactory.createBlob(type);
    }

    @Override
    public Bean createBlobComment(String type) {
        return blobCommentFactory.createBlobComment(type);
    }

}
